#!/bin/bash
#

read -p "(删除)用户名:" name

userdel -r $name

id $name &> /dev/null

if [ $? -ne 0 ]; then
 echo "用户${name}及相关文件已删除" 
fi
